/// data : [{"desc":"我们支持订阅啦~","id":30,"imagePath":"https://www.wanandroid.com/blogimgs/42da12d8-de56-4439-b40c-eab66c227a4b.png","isVisible":1,"order":2,"title":"我们支持订阅啦~","type":0,"url":"https://www.wanandroid.com/blog/show/3352"},{"desc":"","id":6,"imagePath":"https://www.wanandroid.com/blogimgs/62c1bd68-b5f3-4a3c-a649-7ca8c7dfabe6.png","isVisible":1,"order":1,"title":"我们新增了一个常用导航Tab~","type":1,"url":"https://www.wanandroid.com/navi"},{"desc":"一起来做个App吧","id":10,"imagePath":"https://www.wanandroid.com/blogimgs/50c115c2-cf6c-4802-aa7b-a4334de444cd.png","isVisible":1,"order":1,"title":"一起来做个App吧","type":1,"url":"https://www.wanandroid.com/blog/show/2"}]
/// errorCode : 0
/// errorMsg : ""

class BannerEntity {
  List<BannerDataBean>? data;
  int? errorCode;
  String? errorMsg;

  static BannerEntity? fromMap(Map<String, dynamic> map) {
    if (map == null) return null;
    BannerEntity bannerEntityBean = BannerEntity();
    bannerEntityBean.data = []..addAll(
      (map['data'] as List).map((o) => BannerDataBean.fromMap(o)!)
    );
    bannerEntityBean.errorCode = map['errorCode'];
    bannerEntityBean.errorMsg = map['errorMsg'];
    return bannerEntityBean;
  }

  Map toJson() => {
    "data": data,
    "errorCode": errorCode,
    "errorMsg": errorMsg,
  };
}

/// desc : "我们支持订阅啦~"
/// id : 30
/// imagePath : "https://www.wanandroid.com/blogimgs/42da12d8-de56-4439-b40c-eab66c227a4b.png"
/// isVisible : 1
/// order : 2
/// title : "我们支持订阅啦~"
/// type : 0
/// url : "https://www.wanandroid.com/blog/show/3352"

class BannerDataBean {
  String? desc;
  int? id;
  String? imagePath;
  int? isVisible;
  int? order;
  String? title;
  int? type;
  String? url;

  static BannerDataBean? fromMap(Map<String, dynamic> map) {
    if (map == null) return null;
    BannerDataBean dataBean = BannerDataBean();
    dataBean.desc = map['desc'];
    dataBean.id = map['id'];
    dataBean.imagePath = map['imagePath'];
    dataBean.isVisible = map['isVisible'];
    dataBean.order = map['order'];
    dataBean.title = map['title'];
    dataBean.type = map['type'];
    dataBean.url = map['url'];
    return dataBean;
  }

  Map toJson() => {
    "desc": desc,
    "id": id,
    "imagePath": imagePath,
    "isVisible": isVisible,
    "order": order,
    "title": title,
    "type": type,
    "url": url,
  };
}